<!--
 * @Author: your name
 * @Date: 2021-12-03 14:34:50
 * @LastEditTime: 2021-12-18 12:00:09
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \homeStayMS\src\main\resources\templates\register.html
-->

<!DOCTYPE html>
<html lang="en"
			xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="UTF-8">
	<title>注册页面</title>

	<script src="../static/lib/vue/vue.js"></script>
	<!-- vue2-sfc-loader 工具需要在vue引入之后使用。 -->
	<script src="../static/lib/vue2-sfc-loader/vue2-sfc-loader.js"></script>
	<script src="../static/lib/element-ui/elementUI.js"></script>
	<link rel="stylesheet"
				href="../static/lib/element-ui/elementUI.css">

	<link rel="stylesheet"
				href="../static/css/login.css">
</head>

<body>
	<main id="registerPage"></main>
</body>

<script type="module">
	// 标准配置： 根组件挂载的dom元素id名称。必须带上#号
	const mountId = '#registerPage';
	// 标准配置： 组件路径，必须补全文件后缀。使用相对路径。
	const componentSrc = '../static/vue/Register/Register.vue';
	const { loadModule } = window['vue2-sfc-loader'];
	const options = {
		moduleCache: { vue: Vue },
		async getFile(url) {
			const res = await fetch(url);
			if ( !res.ok ){
				throw Object.assign(new Error(res.statusText + ' ' + url), { res });
			}
			return {
				getContentData: asBinary => asBinary ? res.arrayBuffer() : res.text(),
			};
		},
		addStyle(textContent) {
			const style = Object.assign(document.createElement('style'), { textContent });
			const ref = document.head.getElementsByTagName('style')[0] || null;
			document.head.insertBefore(style, ref);
		},
	};
	loadModule(componentSrc, options)
	.then(component => new Vue(component).$mount(mountId));
</script>

</html>